home *** CD-ROM | disk | FTP | other *** search
- /*
-
- File: Main.c
-
- Contains: A simple shell that allows the testing of the StandardGetAlias
- routine.
-
- Version: 1.0
-
- Copyright: © 1998-1999 by Apple Computer, Inc., all rights reserved
-
- Technology: Standard File dialogs
-
- Bugs?: For bug reports, consult the following page on
- the World Wide Web:
-
- http://developer.apple.com/bugreporter/
-
- ========================================================================
- You may incorporate this sample code into your applications without
- restriction, though the sample code has been provided “AS IS” and the
- responsibility for its operation is 100% yours. However, what you are
- not permitted to do is to redistribute the source as “DSC Sample Code”
- after having made changes. If you’re going to re-distribute the source,
- we require that you make it clear in the source that the code was
- descended from Apple Sample Code, but that you’ve made changes.
- ========================================================================
-
- Writers:
-
- (afb) Andy Bachorski
-
- Change History (most recent first):
-
- <1> 2/9/99 afb first checked in
-
- */
-
- //****************** Universal Interfaces ****************************
-
- #include <Dialogs.h>
- #include <Finder.h>
- #include <Fonts.h>
- #include <Menus.h>
- #include <Quickdraw.h>
- #include <TextEdit.h>
-
-
- //****************** Project Interfaces ****************************
-
- #include "StandardGetAlias.h"
-
- void main(void)
- {
- StandardFileReply mySFReply;
-
- // init the toolbox
-
- MaxApplZone();
- InitGraf(&qd.thePort);
- InitFonts();
- InitWindows();
- InitMenus();
- TEInit();
- InitDialogs(nil);
-
- // Call the get folder routine, passing in our file filter
-
-
- StandardGetAlias( &mySFReply );
-
- // MacsBug is indeed the best UI for reporting results
- /*
- if (mySFReply.sfGood)
- {
- DebugStr(mySFReply.sfFile.name);
-
- if (mySFReply.sfIsVolume) DebugStr("\p is a volume");
- }
- else
- {
- DebugStr("\p cancelled");
- }
- */
- }